import java.util.Scanner;

public class  String_05 {

    //需求：键盘录入一个字符串，统计该字符串中大写字母字符，小写字母字符，数字字符的个数
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入字符串：");
        String line = scanner.nextLine();
        int big=0,small=0,shuzi=0;
        for (int i=0;i<line.length();i++){
            char ch=line.charAt(i);
            if (ch>='A'&&ch<='Z'){
                big++;
            }
            else if (ch>='a'&&ch<='z'){
                small++;
            }
            else if (ch>='0'&&ch<='9'){
                shuzi++;
            }
        }
        System.out.println("大写字母共"+big+"个,"+"小写字母共"+small+"个,"+"数字共"+shuzi+"个.");
    }
}
